package demo4.dao;

import org.springframework.stereotype.Component;

@Component
public class UserDAOImpl implements IUserDAO {

    @Override
    public boolean finUser() {
        System.out.println("UserDAO:根据用户名去数据库中查询用户信息");
        double random = Math.random();
        if (random > 0.5){
            System.out.println("UserDAO:用户信息已找到，将其返回");
            return true;
        }else {
            System.out.println("UserDAO:该用户不存在");
            return false;
        }
    }
}
